package lumis.doui.source;

import lumis.doui.DouiContext;
import lumis.portal.authentication.SessionConfig;
import lumis.portal.serviceinstance.ServiceInstanceConfig;
import lumis.portal.stability.StableMinor;
import lumis.portal.transaction.ITransaction;

/**
 * Offers information about the context where a source is being used.
 * 
 * @since 4.0.4
 * @version $Revision: 13082 $ $Date: 2011-05-27 16:03:12 -0300 (Fri, 27 May 2011) $
 */
@StableMinor(version = "6.0", sinceVersion = "4.0")
public interface ISourceContext
{
	/**
	 * Returns the doui context this source context belongs to.
	 * @return the doui context this source context belongs to, or null if 
	 * this source context does not belongs to a doui context.
	 * @since 4.0.4
	 */
	public DouiContext getDouiContext();
	
	/**
	 * Returns the transaction for persistence access.
	 * @return the transaction for persistence access.
	 * @since 4.0.4
	 */
	public ITransaction getTransaction();

	/**
	 * Returns the user session information.
	 * @return the user session information.
	 * @since 4.0.4
	 */
	public SessionConfig getSessionConfig();
	
	/**
	 * Returns the service instance of this context.
	 * @return the service instance of this context.
	 * @since 4.0.4
	 */
	public ServiceInstanceConfig getServiceInstanceConfig();
}
